package com.jt.controller;

/**
 * @author :Colin
 * @version 创建时间: 2021/7/26 11:13
 */

import com.jt.pojo.User;

import com.jt.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class UserController {
    @Autowired
    private UserService userService;
    @RequestMapping("/getAll")
    public List<User> getAll(){
        return userService.getAll();

    }
    @RequestMapping("/delete")
    public void delete(Integer id){
        userService.delete(id);

    }




}
